package mysql

import "gorm.io/gorm"

type Doctor struct {
	gorm.Model
	CodeID   string `gorm:"type:varchar(30)"`
	Password string `gorm:"type:varchar(32)"`
	Typer    string `gorm:"type:varchar(30)"`
}

func (d *Doctor) DoctorFind(db *gorm.DB, id string) error {
	return db.Debug().Where("code_id=?", id).First(d).Error
}

func (d *Doctor) FinfDoctor(db *gorm.DB, id int64) error {
	return db.Debug().Where("id=?", id).Find(d).Error
}
